import myRequest from './index';

export const getFileListApi = (data: any) => {
  return myRequest<any>('/admin_api/file/list', {
    method: 'POST',
    data,
  });
};

export const fileUploadApi = (data: FormData) => {
  return myRequest<any>('/admin_api/file/batch_upload', {
    method: 'POST',
    data,
    headers: {
      'Content-Type': 'multipart/form-data; boundary=----',
    },
  });
};

export const uploadApi = (data: FormData) => {
  return myRequest<any>('/admin_api/file/upload', {
    method: 'POST',
    data,
    headers: {
      'Content-Type': 'multipart/form-data; boundary=----',
    },
  });
};

export const editFileApi = (data: any) => {
  return myRequest<any>('/admin_api/file/edit', {
    method: 'POST',
    data,
  });
};
